package www.wackyboy.top.dao;

import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import www.wackyboy.top.Dept;

public interface IDeptDao {



    @Select("select * from dept where deptid = #{deptid}")
    @Results({
            @Result(id = true, property = "deptId", column = "deptId"),
            @Result(property = "deptName", column = "deptName"),
            @Result(property = "deptInfo", column = "deptInfo"),
            @Result(property = "deptManager", column = "deptManager"),
            @Result(property = "employee", column = "deptId", javaType = java.util.List.class, many = @Many(select = "www.wackyboy.top.dao.IUserDao.queryInfoByDeptid"))

    })
    Dept searchDeptInfoById(Integer deptId);
}
